Xbasic

OBJECT.DISABLE Function

Syntax

.Disable()

Description

Disables the main Alpha Anywhere program window.

Discussion

The <OBJECT>.DISABLE() method applies to:

Alpha Anywhere (for <OBJECT> use the keyword "A5")
Browses (for <OBJECT> use either the <BROWSE> pointer or the name of the browse)
Forms (for <OBJECT> use either the <FORM> pointer or the name of the form)
Form Controls (for <OBJECT> use the <CONTROL> pointer or the address of the control)

The <OBJECT>.DISABLE() method makes the object unable to receive focus. The method also works for child objects on forms and may gray them.

Example

The following script on the OnDepart event for the PayMethod field on a form disables the CreditCard field if the payment method was not "Credit Card":

if (PayMethod.value <> "Credit Card") then
    CreditCard.disable()
else
    CreditCard.enable()
end if

Limitations

Desktop applications only.

See Also